﻿using System.IO;
using Microsoft.WindowsMobile.Forms;

namespace SharePointBrowser
{
    public static class CameraHelper
    {
        public static bool TakePicture(FileInfo filename)
        {
            CameraCaptureDialog camera = new CameraCaptureDialog();

            camera.InitialDirectory = filename.Directory.FullName;
            camera.DefaultFileName = filename.Name;
            camera.Mode = CameraCaptureMode.Still;

            return (camera.ShowDialog() == System.Windows.Forms.DialogResult.OK);              
        }
    }
}
